package com.admin.controller;

import com.admin.common.util.CommRest;
import com.admin.common.util.Rest;
import com.admin.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: xj-shop
 * @description: 测试接口
 * @author: 徐健
 * @create: 2022-09-01 10:27
 **/
@RestController
public class TestController {

    @Autowired
    private IUserService userService;

    @PostMapping(value = "test")
    public Rest test(@RequestBody Integer id){
        //增加一部分注释
        System.out.println("接收的参数为："+id);
        return CommRest.success(userService.getById(id));
    }
}
